<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>My Project: Cookie.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">My Project
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="headertitle"><div class="title">Cookie.h</div></div>
</div><!--header-->
<div class="contents">
<a href="Cookie_8h.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span> </div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span> </div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span><span class="preprocessor">#include &lt;<a class="code" href="exports_8h.html">drogon/exports.h</a>&gt;</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span><span class="preprocessor">#include &lt;trantor/utils/Date.h&gt;</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span><span class="preprocessor">#include &lt;trantor/utils/Logger.h&gt;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span><span class="preprocessor">#include &lt;drogon/utils/Utilities.h&gt;</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span><span class="preprocessor">#include &lt;cctype&gt;</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span><span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span><span class="preprocessor">#include &lt;limits&gt;</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span><span class="preprocessor">#include &lt;optional&gt;</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span><span class="preprocessor">#include &lt;string_view&gt;</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span> </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacedrogon.html">drogon</a></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span>{</div>
<div class="foldopen" id="foldopen00031" data-start="{" data-end="};">
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html">   31</a></span><span class="keyword">class </span><a class="code hl_define" href="exports_8h.html#a00d0a001c2dd03906272e00b0598182e">DROGON_EXPORT</a> <a class="code hl_class" href="classdrogon_1_1Cookie.html">Cookie</a></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span>{</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span>  <span class="keyword">public</span>:</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span> </div>
<div class="foldopen" id="foldopen00039" data-start="{" data-end="}">
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#ad2d57c056e047790c2fa230e1f6d45f3">   39</a></span>    <a class="code hl_function" href="classdrogon_1_1Cookie.html#ad2d57c056e047790c2fa230e1f6d45f3">Cookie</a>(std::string key, std::string value)</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span>        : key_(std::move(key)), value_(std::move(value))</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno">   41</span>    {</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span>    }</div>
</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span> </div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#a250bf074167b5d15edd6769096c45478">   44</a></span>    <a class="code hl_function" href="classdrogon_1_1Cookie.html#a250bf074167b5d15edd6769096c45478">Cookie</a>() = <span class="keywordflow">default</span>;</div>
<div class="foldopen" id="foldopen00045" data-start="{" data-end="};">
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#af0969c5652b7eeab6ccf22d319047e3c">   45</a></span>    <span class="keyword">enum class</span> <a class="code hl_enumeration" href="classdrogon_1_1Cookie.html#af0969c5652b7eeab6ccf22d319047e3c">SameSite</a></div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span>    {</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span>        kNull,</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span>        kLax,</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno">   49</span>        kStrict,</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno">   50</span>        <a class="code hl_enumvalue" href="namespacedrogon.html#aeb82de311298c06b27c32eecb1829bb4a35c3ace1970663a16e5c65baa5941b13">kNone</a></div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno">   51</span>    };</div>
</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno">   52</span> </div>
<div class="foldopen" id="foldopen00058" data-start="{" data-end="}">
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#a989e976109a7c1bbbad2fe3b300cba18">   58</a></span>    <span class="keywordtype">void</span> <a class="code hl_function" href="classdrogon_1_1Cookie.html#a989e976109a7c1bbbad2fe3b300cba18">setExpiresDate</a>(<span class="keyword">const</span> trantor::Date &amp;date)</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno">   59</span>    {</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span>        expiresDate_ = date;</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno">   61</span>    }</div>
</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno">   62</span> </div>
<div class="foldopen" id="foldopen00066" data-start="{" data-end="}">
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#a1e19df314c1f82f92fe1660f561f53e9">   66</a></span>    <span class="keywordtype">void</span> <a class="code hl_function" href="classdrogon_1_1Cookie.html#a1e19df314c1f82f92fe1660f561f53e9">setHttpOnly</a>(<span class="keywordtype">bool</span> only)</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno">   67</span>    {</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno">   68</span>        httpOnly_ = only;</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span>    }</div>
</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span> </div>
<div class="foldopen" id="foldopen00074" data-start="{" data-end="}">
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#a3b691b49250d62b7b362dc0bc3712b19">   74</a></span>    <span class="keywordtype">void</span> <a class="code hl_function" href="classdrogon_1_1Cookie.html#a3b691b49250d62b7b362dc0bc3712b19">setSecure</a>(<span class="keywordtype">bool</span> secure)</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span>    {</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno">   76</span>        secure_ = secure;</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno">   77</span>    }</div>
</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno">   78</span> </div>
<div class="foldopen" id="foldopen00082" data-start="{" data-end="}">
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#af6fba12dad8155ac352552d7f50f4af2">   82</a></span>    <span class="keywordtype">void</span> <a class="code hl_function" href="classdrogon_1_1Cookie.html#af6fba12dad8155ac352552d7f50f4af2">setDomain</a>(<span class="keyword">const</span> std::string &amp;domain)</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno">   83</span>    {</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno">   84</span>        domain_ = domain;</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno">   85</span>    }</div>
</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno">   86</span> </div>
<div class="foldopen" id="foldopen00090" data-start="{" data-end="}">
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#a0cffaef27cc5d4dadc35b42b04e66711">   90</a></span>    <span class="keywordtype">void</span> <a class="code hl_function" href="classdrogon_1_1Cookie.html#a0cffaef27cc5d4dadc35b42b04e66711">setDomain</a>(std::string &amp;&amp;domain)</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span>    {</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno">   92</span>        domain_ = std::move(domain);</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno">   93</span>    }</div>
</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno">   94</span> </div>
<div class="foldopen" id="foldopen00098" data-start="{" data-end="}">
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#a2af53a813afe603e89805c085a4943dd">   98</a></span>    <span class="keywordtype">void</span> <a class="code hl_function" href="classdrogon_1_1Cookie.html#a2af53a813afe603e89805c085a4943dd">setPath</a>(<span class="keyword">const</span> std::string &amp;path)</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno">   99</span>    {</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno">  100</span>        path_ = path;</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno">  101</span>    }</div>
</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno">  102</span> </div>
<div class="foldopen" id="foldopen00106" data-start="{" data-end="}">
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#abf4e2d0e02843fde454e9b22f344e9c6">  106</a></span>    <span class="keywordtype">void</span> <a class="code hl_function" href="classdrogon_1_1Cookie.html#abf4e2d0e02843fde454e9b22f344e9c6">setPath</a>(std::string &amp;&amp;path)</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno">  107</span>    {</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno">  108</span>        path_ = std::move(path);</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span>    }</div>
</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno">  110</span> </div>
<div class="foldopen" id="foldopen00114" data-start="{" data-end="}">
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#a5a68e18b398d25c1c3466537d93a25e0">  114</a></span>    <span class="keywordtype">void</span> <a class="code hl_function" href="classdrogon_1_1Cookie.html#a5a68e18b398d25c1c3466537d93a25e0">setKey</a>(<span class="keyword">const</span> std::string &amp;key)</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno">  115</span>    {</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno">  116</span>        key_ = key;</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno">  117</span>    }</div>
</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno">  118</span> </div>
<div class="foldopen" id="foldopen00122" data-start="{" data-end="}">
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#a661a260a04d1709cb31e1dc817559deb">  122</a></span>    <span class="keywordtype">void</span> <a class="code hl_function" href="classdrogon_1_1Cookie.html#a661a260a04d1709cb31e1dc817559deb">setKey</a>(std::string &amp;&amp;key)</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno">  123</span>    {</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno">  124</span>        key_ = std::move(key);</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno">  125</span>    }</div>
</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno">  126</span> </div>
<div class="foldopen" id="foldopen00130" data-start="{" data-end="}">
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#ad44aa3e69c3904f3ce760d173affa72c">  130</a></span>    <span class="keywordtype">void</span> <a class="code hl_function" href="classdrogon_1_1Cookie.html#ad44aa3e69c3904f3ce760d173affa72c">setValue</a>(<span class="keyword">const</span> std::string &amp;value)</div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno">  131</span>    {</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno">  132</span>        value_ = value;</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno">  133</span>    }</div>
</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno">  134</span> </div>
<div class="foldopen" id="foldopen00138" data-start="{" data-end="}">
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#ac9f9fa5e952552fd07db0d9b41243f2f">  138</a></span>    <span class="keywordtype">void</span> <a class="code hl_function" href="classdrogon_1_1Cookie.html#ac9f9fa5e952552fd07db0d9b41243f2f">setValue</a>(std::string &amp;&amp;value)</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno">  139</span>    {</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno">  140</span>        value_ = std::move(value);</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno">  141</span>    }</div>
</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno">  142</span> </div>
<div class="foldopen" id="foldopen00146" data-start="{" data-end="}">
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#ad4d7b38a06732fc404c3a23cf39e819c">  146</a></span>    <span class="keywordtype">void</span> <a class="code hl_function" href="classdrogon_1_1Cookie.html#ad4d7b38a06732fc404c3a23cf39e819c">setMaxAge</a>(<span class="keywordtype">int</span> value)</div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno">  147</span>    {</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno">  148</span>        maxAge_ = value;</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno">  149</span>    }</div>
</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno">  150</span> </div>
<div class="foldopen" id="foldopen00154" data-start="{" data-end="}">
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#a96bef57ff44f4bba62f7ddf079decb52">  154</a></span>    <span class="keywordtype">void</span> <a class="code hl_function" href="classdrogon_1_1Cookie.html#a96bef57ff44f4bba62f7ddf079decb52">setSameSite</a>(<a class="code hl_enumeration" href="classdrogon_1_1Cookie.html#af0969c5652b7eeab6ccf22d319047e3c">SameSite</a> sameSite)</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno">  155</span>    {</div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno">  156</span>        sameSite_ = sameSite;</div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno">  157</span>    }</div>
</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno">  158</span> </div>
<div class="foldopen" id="foldopen00162" data-start="{" data-end="}">
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#a2cdb6a45965f596f72fe43717029d7fd">  162</a></span>    <span class="keywordtype">void</span> <a class="code hl_function" href="classdrogon_1_1Cookie.html#a2cdb6a45965f596f72fe43717029d7fd">setPartitioned</a>(<span class="keywordtype">bool</span> partitioned)</div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno">  163</span>    {</div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno">  164</span>        partitioned_ = partitioned;</div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno">  165</span>        <span class="keywordflow">if</span> (partitioned)</div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno">  166</span>        {</div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno">  167</span>            setSecure(<span class="keyword">true</span>);</div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno">  168</span>        }</div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno">  169</span>    }</div>
</div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno">  170</span> </div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#aca3cee5a05ff2044e75f6d87b3a2cf43">  174</a></span>    std::string <a class="code hl_function" href="classdrogon_1_1Cookie.html#aca3cee5a05ff2044e75f6d87b3a2cf43">cookieString</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno">  175</span> </div>
<div class="foldopen" id="foldopen00179" data-start="{" data-end="}">
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#a6ad7e1e3828e4fb9cc160f6888d3ad83">  179</a></span>    std::string <a class="code hl_function" href="classdrogon_1_1Cookie.html#a6ad7e1e3828e4fb9cc160f6888d3ad83">getCookieString</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno">  180</span><span class="keyword">    </span>{</div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno">  181</span>        <span class="keywordflow">return</span> cookieString();</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno">  182</span>    }</div>
</div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno">  183</span> </div>
<div class="foldopen" id="foldopen00187" data-start="{" data-end="}">
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#ab52c5c11a57a46985735c4579654aa6e">  187</a></span>    <span class="keyword">const</span> trantor::Date &amp;<a class="code hl_function" href="classdrogon_1_1Cookie.html#ab52c5c11a57a46985735c4579654aa6e">expiresDate</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno">  188</span><span class="keyword">    </span>{</div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno">  189</span>        <span class="keywordflow">return</span> expiresDate_;</div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno">  190</span>    }</div>
</div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno">  191</span> </div>
<div class="foldopen" id="foldopen00195" data-start="{" data-end="}">
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#ac421044cf18123aba9e5bac839003e7d">  195</a></span>    <span class="keyword">const</span> trantor::Date &amp;<a class="code hl_function" href="classdrogon_1_1Cookie.html#ac421044cf18123aba9e5bac839003e7d">getExpiresDate</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno">  196</span><span class="keyword">    </span>{</div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno">  197</span>        <span class="keywordflow">return</span> expiresDate_;</div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno">  198</span>    }</div>
</div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno">  199</span> </div>
<div class="foldopen" id="foldopen00203" data-start="{" data-end="}">
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#a27774667f99fc560c41832fe9bb3ea22">  203</a></span>    <span class="keyword">const</span> std::string &amp;<a class="code hl_function" href="classdrogon_1_1Cookie.html#a27774667f99fc560c41832fe9bb3ea22">domain</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno">  204</span><span class="keyword">    </span>{</div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno">  205</span>        <span class="keywordflow">return</span> domain_;</div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno">  206</span>    }</div>
</div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno">  207</span> </div>
<div class="foldopen" id="foldopen00211" data-start="{" data-end="}">
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#aed5163cd856d631e9cd955423e3cabc4">  211</a></span>    <span class="keyword">const</span> std::string &amp;<a class="code hl_function" href="classdrogon_1_1Cookie.html#aed5163cd856d631e9cd955423e3cabc4">getDomain</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno">  212</span><span class="keyword">    </span>{</div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno">  213</span>        <span class="keywordflow">return</span> domain_;</div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno">  214</span>    }</div>
</div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno">  215</span> </div>
<div class="foldopen" id="foldopen00219" data-start="{" data-end="}">
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#a34b81347466e4d32d28f86274c418efc">  219</a></span>    <span class="keyword">const</span> std::string &amp;<a class="code hl_function" href="classdrogon_1_1Cookie.html#a34b81347466e4d32d28f86274c418efc">path</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno">  220</span><span class="keyword">    </span>{</div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno">  221</span>        <span class="keywordflow">return</span> path_;</div>
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno">  222</span>    }</div>
</div>
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno">  223</span> </div>
<div class="foldopen" id="foldopen00227" data-start="{" data-end="}">
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#a033d3f012dc14972d19e58e3318b3631">  227</a></span>    <span class="keyword">const</span> std::string &amp;<a class="code hl_function" href="classdrogon_1_1Cookie.html#a033d3f012dc14972d19e58e3318b3631">getPath</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno">  228</span><span class="keyword">    </span>{</div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno">  229</span>        <span class="keywordflow">return</span> path_;</div>
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno">  230</span>    }</div>
</div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno">  231</span> </div>
<div class="foldopen" id="foldopen00235" data-start="{" data-end="}">
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#a99966bd140f40b8ef4c0e9f011ff3f48">  235</a></span>    <span class="keyword">const</span> std::string &amp;<a class="code hl_function" href="classdrogon_1_1Cookie.html#a99966bd140f40b8ef4c0e9f011ff3f48">key</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno">  236</span><span class="keyword">    </span>{</div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno">  237</span>        <span class="keywordflow">return</span> key_;</div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno">  238</span>    }</div>
</div>
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno">  239</span> </div>
<div class="foldopen" id="foldopen00243" data-start="{" data-end="}">
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#a58ba3a205e04434e4cbe2102aff6e9e5">  243</a></span>    <span class="keyword">const</span> std::string &amp;<a class="code hl_function" href="classdrogon_1_1Cookie.html#a58ba3a205e04434e4cbe2102aff6e9e5">getKey</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno">  244</span><span class="keyword">    </span>{</div>
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno">  245</span>        <span class="keywordflow">return</span> key_;</div>
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno">  246</span>    }</div>
</div>
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno">  247</span> </div>
<div class="foldopen" id="foldopen00251" data-start="{" data-end="}">
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#aafe7fb695bde5da0cde5f4f36269987d">  251</a></span>    <span class="keyword">const</span> std::string &amp;<a class="code hl_function" href="classdrogon_1_1Cookie.html#aafe7fb695bde5da0cde5f4f36269987d">value</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno">  252</span><span class="keyword">    </span>{</div>
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno">  253</span>        <span class="keywordflow">return</span> value_;</div>
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno">  254</span>    }</div>
</div>
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno">  255</span> </div>
<div class="foldopen" id="foldopen00259" data-start="{" data-end="}">
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#a131941e961860a2d21d98837f14bf2d0">  259</a></span>    <span class="keyword">const</span> std::string &amp;<a class="code hl_function" href="classdrogon_1_1Cookie.html#a131941e961860a2d21d98837f14bf2d0">getValue</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno">  260</span><span class="keyword">    </span>{</div>
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno">  261</span>        <span class="keywordflow">return</span> value_;</div>
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno">  262</span>    }</div>
</div>
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno">  263</span> </div>
<div class="foldopen" id="foldopen00270" data-start="{" data-end="}">
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#a42fba7626723b266401967d236e636cd">  270</a></span>    <span class="keyword">operator</span> bool()<span class="keyword"> const</span></div>
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno">  271</span><span class="keyword">    </span>{</div>
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno">  272</span>        <span class="keywordflow">return</span> (!key_.empty()) &amp;&amp; (!value_.empty());</div>
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno">  273</span>    }</div>
</div>
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno">  274</span> </div>
<div class="foldopen" id="foldopen00281" data-start="{" data-end="}">
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#a9537e5e55c20ec9a0a759a31a19501bb">  281</a></span>    <span class="keywordtype">bool</span> <a class="code hl_function" href="classdrogon_1_1Cookie.html#a9537e5e55c20ec9a0a759a31a19501bb">isHttpOnly</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno">  282</span><span class="keyword">    </span>{</div>
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno">  283</span>        <span class="keywordflow">return</span> httpOnly_;</div>
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno">  284</span>    }</div>
</div>
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno">  285</span> </div>
<div class="foldopen" id="foldopen00292" data-start="{" data-end="}">
<div class="line"><a id="l00292" name="l00292"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#a65e98d927a2e294a74e95a640edd44cb">  292</a></span>    <span class="keywordtype">bool</span> <a class="code hl_function" href="classdrogon_1_1Cookie.html#a65e98d927a2e294a74e95a640edd44cb">isSecure</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno">  293</span><span class="keyword">    </span>{</div>
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno">  294</span>        <span class="keywordflow">return</span> secure_;</div>
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno">  295</span>    }</div>
</div>
<div class="line"><a id="l00296" name="l00296"></a><span class="lineno">  296</span> </div>
<div class="foldopen" id="foldopen00303" data-start="{" data-end="}">
<div class="line"><a id="l00303" name="l00303"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#a304637a67b05d5cbc7b0304bba1fb7d5">  303</a></span>    <span class="keywordtype">bool</span> <a class="code hl_function" href="classdrogon_1_1Cookie.html#a304637a67b05d5cbc7b0304bba1fb7d5">isPartitioned</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno">  304</span><span class="keyword">    </span>{</div>
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno">  305</span>        <span class="keywordflow">return</span> partitioned_;</div>
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno">  306</span>    }</div>
</div>
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno">  307</span> </div>
<div class="foldopen" id="foldopen00311" data-start="{" data-end="}">
<div class="line"><a id="l00311" name="l00311"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#a73789ead5dcf8fd2ef9ba74f8249c61a">  311</a></span>    std::optional&lt;int&gt; <a class="code hl_function" href="classdrogon_1_1Cookie.html#a73789ead5dcf8fd2ef9ba74f8249c61a">maxAge</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00312" name="l00312"></a><span class="lineno">  312</span><span class="keyword">    </span>{</div>
<div class="line"><a id="l00313" name="l00313"></a><span class="lineno">  313</span>        <span class="keywordflow">return</span> maxAge_;</div>
<div class="line"><a id="l00314" name="l00314"></a><span class="lineno">  314</span>    }</div>
</div>
<div class="line"><a id="l00315" name="l00315"></a><span class="lineno">  315</span> </div>
<div class="foldopen" id="foldopen00319" data-start="{" data-end="}">
<div class="line"><a id="l00319" name="l00319"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#a2e2cdb5705c8ff9916d25e19882a4da2">  319</a></span>    std::optional&lt;int&gt; <a class="code hl_function" href="classdrogon_1_1Cookie.html#a2e2cdb5705c8ff9916d25e19882a4da2">getMaxAge</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00320" name="l00320"></a><span class="lineno">  320</span><span class="keyword">    </span>{</div>
<div class="line"><a id="l00321" name="l00321"></a><span class="lineno">  321</span>        <span class="keywordflow">return</span> maxAge_;</div>
<div class="line"><a id="l00322" name="l00322"></a><span class="lineno">  322</span>    }</div>
</div>
<div class="line"><a id="l00323" name="l00323"></a><span class="lineno">  323</span> </div>
<div class="foldopen" id="foldopen00327" data-start="{" data-end="}">
<div class="line"><a id="l00327" name="l00327"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#a23e3f801ae1022685a009d70cfe81eb7">  327</a></span>    <a class="code hl_enumeration" href="classdrogon_1_1Cookie.html#af0969c5652b7eeab6ccf22d319047e3c">SameSite</a> <a class="code hl_function" href="classdrogon_1_1Cookie.html#a23e3f801ae1022685a009d70cfe81eb7">sameSite</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00328" name="l00328"></a><span class="lineno">  328</span><span class="keyword">    </span>{</div>
<div class="line"><a id="l00329" name="l00329"></a><span class="lineno">  329</span>        <span class="keywordflow">return</span> sameSite_;</div>
<div class="line"><a id="l00330" name="l00330"></a><span class="lineno">  330</span>    }</div>
</div>
<div class="line"><a id="l00331" name="l00331"></a><span class="lineno">  331</span> </div>
<div class="foldopen" id="foldopen00335" data-start="{" data-end="}">
<div class="line"><a id="l00335" name="l00335"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#a45747e013c7f1c856749a64b9a4e2ab5">  335</a></span>    <a class="code hl_enumeration" href="classdrogon_1_1Cookie.html#af0969c5652b7eeab6ccf22d319047e3c">SameSite</a> <a class="code hl_function" href="classdrogon_1_1Cookie.html#a45747e013c7f1c856749a64b9a4e2ab5">getSameSite</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00336" name="l00336"></a><span class="lineno">  336</span><span class="keyword">    </span>{</div>
<div class="line"><a id="l00337" name="l00337"></a><span class="lineno">  337</span>        <span class="keywordflow">return</span> sameSite_;</div>
<div class="line"><a id="l00338" name="l00338"></a><span class="lineno">  338</span>    }</div>
</div>
<div class="line"><a id="l00339" name="l00339"></a><span class="lineno">  339</span> </div>
<div class="foldopen" id="foldopen00353" data-start="{" data-end="}">
<div class="line"><a id="l00353" name="l00353"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#a172755eea6ff31ea230016e03e836033">  353</a></span>    <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classdrogon_1_1Cookie.html#a172755eea6ff31ea230016e03e836033">stricmp</a>(<span class="keyword">const</span> std::string_view str1,</div>
<div class="line"><a id="l00354" name="l00354"></a><span class="lineno">  354</span>                        <span class="keyword">const</span> std::string_view str2)</div>
<div class="line"><a id="l00355" name="l00355"></a><span class="lineno">  355</span>    {</div>
<div class="line"><a id="l00356" name="l00356"></a><span class="lineno">  356</span>        <span class="keyword">auto</span> str1Len{str1.length()};</div>
<div class="line"><a id="l00357" name="l00357"></a><span class="lineno">  357</span>        <span class="keyword">auto</span> str2Len{str2.length()};</div>
<div class="line"><a id="l00358" name="l00358"></a><span class="lineno">  358</span>        <span class="keywordflow">if</span> (str1Len != str2Len)</div>
<div class="line"><a id="l00359" name="l00359"></a><span class="lineno">  359</span>            <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00360" name="l00360"></a><span class="lineno">  360</span>        <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> idx{0}; idx &lt; str1Len; ++idx)</div>
<div class="line"><a id="l00361" name="l00361"></a><span class="lineno">  361</span>        {</div>
<div class="line"><a id="l00362" name="l00362"></a><span class="lineno">  362</span>            <span class="keyword">auto</span> lowerChar{tolower(str1[idx])};</div>
<div class="line"><a id="l00363" name="l00363"></a><span class="lineno">  363</span> </div>
<div class="line"><a id="l00364" name="l00364"></a><span class="lineno">  364</span>            <span class="keywordflow">if</span> (lowerChar != str2[idx])</div>
<div class="line"><a id="l00365" name="l00365"></a><span class="lineno">  365</span>            {</div>
<div class="line"><a id="l00366" name="l00366"></a><span class="lineno">  366</span>                <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00367" name="l00367"></a><span class="lineno">  367</span>            }</div>
<div class="line"><a id="l00368" name="l00368"></a><span class="lineno">  368</span>        }</div>
<div class="line"><a id="l00369" name="l00369"></a><span class="lineno">  369</span>        <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a id="l00370" name="l00370"></a><span class="lineno">  370</span>    }</div>
</div>
<div class="line"><a id="l00371" name="l00371"></a><span class="lineno">  371</span> </div>
<div class="foldopen" id="foldopen00376" data-start="{" data-end="}">
<div class="line"><a id="l00376" name="l00376"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#a0dad1a1327062977864fac7bca27c448">  376</a></span>    <span class="keyword">static</span> <a class="code hl_enumeration" href="classdrogon_1_1Cookie.html#af0969c5652b7eeab6ccf22d319047e3c">SameSite</a> <a class="code hl_function" href="classdrogon_1_1Cookie.html#a0dad1a1327062977864fac7bca27c448">convertString2SameSite</a>(std::string_view sameSite)</div>
<div class="line"><a id="l00377" name="l00377"></a><span class="lineno">  377</span>    {</div>
<div class="line"><a id="l00378" name="l00378"></a><span class="lineno">  378</span>        <span class="keywordflow">if</span> (stricmp(sameSite, <span class="stringliteral">&quot;lax&quot;</span>))</div>
<div class="line"><a id="l00379" name="l00379"></a><span class="lineno">  379</span>            <span class="keywordflow">return</span> Cookie::SameSite::kLax;</div>
<div class="line"><a id="l00380" name="l00380"></a><span class="lineno">  380</span>        <span class="keywordflow">if</span> (stricmp(sameSite, <span class="stringliteral">&quot;strict&quot;</span>))</div>
<div class="line"><a id="l00381" name="l00381"></a><span class="lineno">  381</span>            <span class="keywordflow">return</span> Cookie::SameSite::kStrict;</div>
<div class="line"><a id="l00382" name="l00382"></a><span class="lineno">  382</span>        <span class="keywordflow">if</span> (stricmp(sameSite, <span class="stringliteral">&quot;none&quot;</span>))</div>
<div class="line"><a id="l00383" name="l00383"></a><span class="lineno">  383</span>            <span class="keywordflow">return</span> Cookie::SameSite::kNone;</div>
<div class="line"><a id="l00384" name="l00384"></a><span class="lineno">  384</span>        <span class="keywordflow">if</span> (!stricmp(sameSite, <span class="stringliteral">&quot;null&quot;</span>))</div>
<div class="line"><a id="l00385" name="l00385"></a><span class="lineno">  385</span>        {</div>
<div class="line"><a id="l00386" name="l00386"></a><span class="lineno">  386</span>            LOG_WARN</div>
<div class="line"><a id="l00387" name="l00387"></a><span class="lineno">  387</span>                &lt;&lt; <span class="stringliteral">&quot;&#39;&quot;</span> &lt;&lt; sameSite</div>
<div class="line"><a id="l00388" name="l00388"></a><span class="lineno">  388</span>                &lt;&lt; <span class="stringliteral">&quot;&#39; is not a valid SameSite policy. &#39;Null&#39;, &#39;Lax&#39;, &#39;Strict&#39; &quot;</span></div>
<div class="line"><a id="l00389" name="l00389"></a><span class="lineno">  389</span>                   <span class="stringliteral">&quot;or &quot;</span></div>
<div class="line"><a id="l00390" name="l00390"></a><span class="lineno">  390</span>                   <span class="stringliteral">&quot;&#39;None&#39; are proper values. Return value is SameSite::kNull.&quot;</span>;</div>
<div class="line"><a id="l00391" name="l00391"></a><span class="lineno">  391</span>        }</div>
<div class="line"><a id="l00392" name="l00392"></a><span class="lineno">  392</span>        <span class="keywordflow">return</span> Cookie::SameSite::kNull;</div>
<div class="line"><a id="l00393" name="l00393"></a><span class="lineno">  393</span>    }</div>
</div>
<div class="line"><a id="l00394" name="l00394"></a><span class="lineno">  394</span> </div>
<div class="foldopen" id="foldopen00399" data-start="{" data-end="}">
<div class="line"><a id="l00399" name="l00399"></a><span class="lineno"><a class="line" href="classdrogon_1_1Cookie.html#a7f93c8ee9c7490778877505350841ff7">  399</a></span>    <span class="keyword">static</span> std::string_view <a class="code hl_function" href="classdrogon_1_1Cookie.html#a7f93c8ee9c7490778877505350841ff7">convertSameSite2String</a>(<a class="code hl_enumeration" href="classdrogon_1_1Cookie.html#af0969c5652b7eeab6ccf22d319047e3c">SameSite</a> sameSite)</div>
<div class="line"><a id="l00400" name="l00400"></a><span class="lineno">  400</span>    {</div>
<div class="line"><a id="l00401" name="l00401"></a><span class="lineno">  401</span>        <span class="keywordflow">switch</span> (sameSite)</div>
<div class="line"><a id="l00402" name="l00402"></a><span class="lineno">  402</span>        {</div>
<div class="line"><a id="l00403" name="l00403"></a><span class="lineno">  403</span>            <span class="keywordflow">case</span> SameSite::kLax:</div>
<div class="line"><a id="l00404" name="l00404"></a><span class="lineno">  404</span>                <span class="keywordflow">return</span> <span class="stringliteral">&quot;Lax&quot;</span>;</div>
<div class="line"><a id="l00405" name="l00405"></a><span class="lineno">  405</span>            <span class="keywordflow">case</span> SameSite::kStrict:</div>
<div class="line"><a id="l00406" name="l00406"></a><span class="lineno">  406</span>                <span class="keywordflow">return</span> <span class="stringliteral">&quot;Strict&quot;</span>;</div>
<div class="line"><a id="l00407" name="l00407"></a><span class="lineno">  407</span>            <span class="keywordflow">case</span> SameSite::kNone:</div>
<div class="line"><a id="l00408" name="l00408"></a><span class="lineno">  408</span>                <span class="keywordflow">return</span> <span class="stringliteral">&quot;None&quot;</span>;</div>
<div class="line"><a id="l00409" name="l00409"></a><span class="lineno">  409</span>            <span class="keywordflow">case</span> SameSite::kNull:</div>
<div class="line"><a id="l00410" name="l00410"></a><span class="lineno">  410</span>                <span class="keywordflow">return</span> <span class="stringliteral">&quot;Null&quot;</span>;</div>
<div class="line"><a id="l00411" name="l00411"></a><span class="lineno">  411</span>            <span class="keywordflow">default</span>:</div>
<div class="line"><a id="l00412" name="l00412"></a><span class="lineno">  412</span>                <span class="keywordflow">return</span> <span class="stringliteral">&quot;UNDEFINED&quot;</span>;</div>
<div class="line"><a id="l00413" name="l00413"></a><span class="lineno">  413</span>        }</div>
<div class="line"><a id="l00414" name="l00414"></a><span class="lineno">  414</span>    }</div>
</div>
<div class="line"><a id="l00415" name="l00415"></a><span class="lineno">  415</span> </div>
<div class="line"><a id="l00416" name="l00416"></a><span class="lineno">  416</span>  <span class="keyword">private</span>:</div>
<div class="line"><a id="l00417" name="l00417"></a><span class="lineno">  417</span>    trantor::Date expiresDate_{(std::numeric_limits&lt;int64_t&gt;::max)()};</div>
<div class="line"><a id="l00418" name="l00418"></a><span class="lineno">  418</span>    <span class="keywordtype">bool</span> httpOnly_{<span class="keyword">true</span>};</div>
<div class="line"><a id="l00419" name="l00419"></a><span class="lineno">  419</span>    <span class="keywordtype">bool</span> secure_{<span class="keyword">false</span>};</div>
<div class="line"><a id="l00420" name="l00420"></a><span class="lineno">  420</span>    <span class="keywordtype">bool</span> partitioned_{<span class="keyword">false</span>};</div>
<div class="line"><a id="l00421" name="l00421"></a><span class="lineno">  421</span>    std::string domain_;</div>
<div class="line"><a id="l00422" name="l00422"></a><span class="lineno">  422</span>    std::string path_;</div>
<div class="line"><a id="l00423" name="l00423"></a><span class="lineno">  423</span>    std::string key_;</div>
<div class="line"><a id="l00424" name="l00424"></a><span class="lineno">  424</span>    std::string value_;</div>
<div class="line"><a id="l00425" name="l00425"></a><span class="lineno">  425</span>    std::optional&lt;int&gt; maxAge_;</div>
<div class="line"><a id="l00426" name="l00426"></a><span class="lineno">  426</span>    SameSite sameSite_{SameSite::kNull};</div>
<div class="line"><a id="l00427" name="l00427"></a><span class="lineno">  427</span>};</div>
</div>
<div class="line"><a id="l00428" name="l00428"></a><span class="lineno">  428</span> </div>
<div class="line"><a id="l00429" name="l00429"></a><span class="lineno">  429</span>}  <span class="comment">// namespace drogon</span></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html"><div class="ttname"><a href="classdrogon_1_1Cookie.html">drogon::Cookie</a></div><div class="ttdoc">this class represents a cookie entity.</div><div class="ttdef"><b>Definition</b> Cookie.h:32</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_a033d3f012dc14972d19e58e3318b3631"><div class="ttname"><a href="classdrogon_1_1Cookie.html#a033d3f012dc14972d19e58e3318b3631">drogon::Cookie::getPath</a></div><div class="ttdeci">const std::string &amp; getPath() const</div><div class="ttdoc">Get the path of the cookie</div><div class="ttdef"><b>Definition</b> Cookie.h:227</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_a0cffaef27cc5d4dadc35b42b04e66711"><div class="ttname"><a href="classdrogon_1_1Cookie.html#a0cffaef27cc5d4dadc35b42b04e66711">drogon::Cookie::setDomain</a></div><div class="ttdeci">void setDomain(std::string &amp;&amp;domain)</div><div class="ttdoc">Set the domain of the cookie.</div><div class="ttdef"><b>Definition</b> Cookie.h:90</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_a0dad1a1327062977864fac7bca27c448"><div class="ttname"><a href="classdrogon_1_1Cookie.html#a0dad1a1327062977864fac7bca27c448">drogon::Cookie::convertString2SameSite</a></div><div class="ttdeci">static SameSite convertString2SameSite(std::string_view sameSite)</div><div class="ttdoc">Converts a string value to its associated enum class SameSite value</div><div class="ttdef"><b>Definition</b> Cookie.h:376</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_a131941e961860a2d21d98837f14bf2d0"><div class="ttname"><a href="classdrogon_1_1Cookie.html#a131941e961860a2d21d98837f14bf2d0">drogon::Cookie::getValue</a></div><div class="ttdeci">const std::string &amp; getValue() const</div><div class="ttdoc">Get the value of the cookie</div><div class="ttdef"><b>Definition</b> Cookie.h:259</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_a172755eea6ff31ea230016e03e836033"><div class="ttname"><a href="classdrogon_1_1Cookie.html#a172755eea6ff31ea230016e03e836033">drogon::Cookie::stricmp</a></div><div class="ttdeci">static bool stricmp(const std::string_view str1, const std::string_view str2)</div><div class="ttdoc">Compare two strings ignoring the their cases</div><div class="ttdef"><b>Definition</b> Cookie.h:353</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_a1e19df314c1f82f92fe1660f561f53e9"><div class="ttname"><a href="classdrogon_1_1Cookie.html#a1e19df314c1f82f92fe1660f561f53e9">drogon::Cookie::setHttpOnly</a></div><div class="ttdeci">void setHttpOnly(bool only)</div><div class="ttdoc">Set if the cookie is HTTP only.</div><div class="ttdef"><b>Definition</b> Cookie.h:66</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_a23e3f801ae1022685a009d70cfe81eb7"><div class="ttname"><a href="classdrogon_1_1Cookie.html#a23e3f801ae1022685a009d70cfe81eb7">drogon::Cookie::sameSite</a></div><div class="ttdeci">SameSite sameSite() const</div><div class="ttdoc">Get the same site of the cookie</div><div class="ttdef"><b>Definition</b> Cookie.h:327</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_a250bf074167b5d15edd6769096c45478"><div class="ttname"><a href="classdrogon_1_1Cookie.html#a250bf074167b5d15edd6769096c45478">drogon::Cookie::Cookie</a></div><div class="ttdeci">Cookie()=default</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_a27774667f99fc560c41832fe9bb3ea22"><div class="ttname"><a href="classdrogon_1_1Cookie.html#a27774667f99fc560c41832fe9bb3ea22">drogon::Cookie::domain</a></div><div class="ttdeci">const std::string &amp; domain() const</div><div class="ttdoc">Get the domain of the cookie</div><div class="ttdef"><b>Definition</b> Cookie.h:203</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_a2af53a813afe603e89805c085a4943dd"><div class="ttname"><a href="classdrogon_1_1Cookie.html#a2af53a813afe603e89805c085a4943dd">drogon::Cookie::setPath</a></div><div class="ttdeci">void setPath(const std::string &amp;path)</div><div class="ttdoc">Set the path of the cookie.</div><div class="ttdef"><b>Definition</b> Cookie.h:98</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_a2cdb6a45965f596f72fe43717029d7fd"><div class="ttname"><a href="classdrogon_1_1Cookie.html#a2cdb6a45965f596f72fe43717029d7fd">drogon::Cookie::setPartitioned</a></div><div class="ttdeci">void setPartitioned(bool partitioned)</div><div class="ttdoc">Set the partitioned status of the cookie</div><div class="ttdef"><b>Definition</b> Cookie.h:162</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_a2e2cdb5705c8ff9916d25e19882a4da2"><div class="ttname"><a href="classdrogon_1_1Cookie.html#a2e2cdb5705c8ff9916d25e19882a4da2">drogon::Cookie::getMaxAge</a></div><div class="ttdeci">std::optional&lt; int &gt; getMaxAge() const</div><div class="ttdoc">Get the max-age of the cookie</div><div class="ttdef"><b>Definition</b> Cookie.h:319</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_a304637a67b05d5cbc7b0304bba1fb7d5"><div class="ttname"><a href="classdrogon_1_1Cookie.html#a304637a67b05d5cbc7b0304bba1fb7d5">drogon::Cookie::isPartitioned</a></div><div class="ttdeci">bool isPartitioned() const</div><div class="ttdoc">Check if the cookie is partitioned.</div><div class="ttdef"><b>Definition</b> Cookie.h:303</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_a34b81347466e4d32d28f86274c418efc"><div class="ttname"><a href="classdrogon_1_1Cookie.html#a34b81347466e4d32d28f86274c418efc">drogon::Cookie::path</a></div><div class="ttdeci">const std::string &amp; path() const</div><div class="ttdoc">Get the path of the cookie</div><div class="ttdef"><b>Definition</b> Cookie.h:219</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_a3b691b49250d62b7b362dc0bc3712b19"><div class="ttname"><a href="classdrogon_1_1Cookie.html#a3b691b49250d62b7b362dc0bc3712b19">drogon::Cookie::setSecure</a></div><div class="ttdeci">void setSecure(bool secure)</div><div class="ttdoc">Set if the cookie is secure.</div><div class="ttdef"><b>Definition</b> Cookie.h:74</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_a45747e013c7f1c856749a64b9a4e2ab5"><div class="ttname"><a href="classdrogon_1_1Cookie.html#a45747e013c7f1c856749a64b9a4e2ab5">drogon::Cookie::getSameSite</a></div><div class="ttdeci">SameSite getSameSite() const</div><div class="ttdoc">Get the same site of the cookie</div><div class="ttdef"><b>Definition</b> Cookie.h:335</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_a58ba3a205e04434e4cbe2102aff6e9e5"><div class="ttname"><a href="classdrogon_1_1Cookie.html#a58ba3a205e04434e4cbe2102aff6e9e5">drogon::Cookie::getKey</a></div><div class="ttdeci">const std::string &amp; getKey() const</div><div class="ttdoc">Get the keyword of the cookie</div><div class="ttdef"><b>Definition</b> Cookie.h:243</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_a5a68e18b398d25c1c3466537d93a25e0"><div class="ttname"><a href="classdrogon_1_1Cookie.html#a5a68e18b398d25c1c3466537d93a25e0">drogon::Cookie::setKey</a></div><div class="ttdeci">void setKey(const std::string &amp;key)</div><div class="ttdoc">Set the key of the cookie.</div><div class="ttdef"><b>Definition</b> Cookie.h:114</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_a65e98d927a2e294a74e95a640edd44cb"><div class="ttname"><a href="classdrogon_1_1Cookie.html#a65e98d927a2e294a74e95a640edd44cb">drogon::Cookie::isSecure</a></div><div class="ttdeci">bool isSecure() const</div><div class="ttdoc">Check if the cookie is secure.</div><div class="ttdef"><b>Definition</b> Cookie.h:292</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_a661a260a04d1709cb31e1dc817559deb"><div class="ttname"><a href="classdrogon_1_1Cookie.html#a661a260a04d1709cb31e1dc817559deb">drogon::Cookie::setKey</a></div><div class="ttdeci">void setKey(std::string &amp;&amp;key)</div><div class="ttdoc">Set the key of the cookie.</div><div class="ttdef"><b>Definition</b> Cookie.h:122</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_a6ad7e1e3828e4fb9cc160f6888d3ad83"><div class="ttname"><a href="classdrogon_1_1Cookie.html#a6ad7e1e3828e4fb9cc160f6888d3ad83">drogon::Cookie::getCookieString</a></div><div class="ttdeci">std::string getCookieString() const</div><div class="ttdoc">Get the string value of the cookie</div><div class="ttdef"><b>Definition</b> Cookie.h:179</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_a73789ead5dcf8fd2ef9ba74f8249c61a"><div class="ttname"><a href="classdrogon_1_1Cookie.html#a73789ead5dcf8fd2ef9ba74f8249c61a">drogon::Cookie::maxAge</a></div><div class="ttdeci">std::optional&lt; int &gt; maxAge() const</div><div class="ttdoc">Get the max-age of the cookie</div><div class="ttdef"><b>Definition</b> Cookie.h:311</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_a7f93c8ee9c7490778877505350841ff7"><div class="ttname"><a href="classdrogon_1_1Cookie.html#a7f93c8ee9c7490778877505350841ff7">drogon::Cookie::convertSameSite2String</a></div><div class="ttdeci">static std::string_view convertSameSite2String(SameSite sameSite)</div><div class="ttdoc">Converts an enum class SameSite value to its associated string value</div><div class="ttdef"><b>Definition</b> Cookie.h:399</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_a9537e5e55c20ec9a0a759a31a19501bb"><div class="ttname"><a href="classdrogon_1_1Cookie.html#a9537e5e55c20ec9a0a759a31a19501bb">drogon::Cookie::isHttpOnly</a></div><div class="ttdeci">bool isHttpOnly() const</div><div class="ttdoc">Check if the cookie is HTTP only</div><div class="ttdef"><b>Definition</b> Cookie.h:281</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_a96bef57ff44f4bba62f7ddf079decb52"><div class="ttname"><a href="classdrogon_1_1Cookie.html#a96bef57ff44f4bba62f7ddf079decb52">drogon::Cookie::setSameSite</a></div><div class="ttdeci">void setSameSite(SameSite sameSite)</div><div class="ttdoc">Set the same site of the cookie.</div><div class="ttdef"><b>Definition</b> Cookie.h:154</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_a989e976109a7c1bbbad2fe3b300cba18"><div class="ttname"><a href="classdrogon_1_1Cookie.html#a989e976109a7c1bbbad2fe3b300cba18">drogon::Cookie::setExpiresDate</a></div><div class="ttdeci">void setExpiresDate(const trantor::Date &amp;date)</div><div class="ttdoc">Set the Expires Date</div><div class="ttdef"><b>Definition</b> Cookie.h:58</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_a99966bd140f40b8ef4c0e9f011ff3f48"><div class="ttname"><a href="classdrogon_1_1Cookie.html#a99966bd140f40b8ef4c0e9f011ff3f48">drogon::Cookie::key</a></div><div class="ttdeci">const std::string &amp; key() const</div><div class="ttdoc">Get the keyword of the cookie</div><div class="ttdef"><b>Definition</b> Cookie.h:235</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_aafe7fb695bde5da0cde5f4f36269987d"><div class="ttname"><a href="classdrogon_1_1Cookie.html#aafe7fb695bde5da0cde5f4f36269987d">drogon::Cookie::value</a></div><div class="ttdeci">const std::string &amp; value() const</div><div class="ttdoc">Get the value of the cookie</div><div class="ttdef"><b>Definition</b> Cookie.h:251</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_ab52c5c11a57a46985735c4579654aa6e"><div class="ttname"><a href="classdrogon_1_1Cookie.html#ab52c5c11a57a46985735c4579654aa6e">drogon::Cookie::expiresDate</a></div><div class="ttdeci">const trantor::Date &amp; expiresDate() const</div><div class="ttdoc">Get the expiration date of the cookie</div><div class="ttdef"><b>Definition</b> Cookie.h:187</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_abf4e2d0e02843fde454e9b22f344e9c6"><div class="ttname"><a href="classdrogon_1_1Cookie.html#abf4e2d0e02843fde454e9b22f344e9c6">drogon::Cookie::setPath</a></div><div class="ttdeci">void setPath(std::string &amp;&amp;path)</div><div class="ttdoc">Set the path of the cookie.</div><div class="ttdef"><b>Definition</b> Cookie.h:106</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_ac421044cf18123aba9e5bac839003e7d"><div class="ttname"><a href="classdrogon_1_1Cookie.html#ac421044cf18123aba9e5bac839003e7d">drogon::Cookie::getExpiresDate</a></div><div class="ttdeci">const trantor::Date &amp; getExpiresDate() const</div><div class="ttdoc">Get the expiration date of the cookie</div><div class="ttdef"><b>Definition</b> Cookie.h:195</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_ac9f9fa5e952552fd07db0d9b41243f2f"><div class="ttname"><a href="classdrogon_1_1Cookie.html#ac9f9fa5e952552fd07db0d9b41243f2f">drogon::Cookie::setValue</a></div><div class="ttdeci">void setValue(std::string &amp;&amp;value)</div><div class="ttdoc">Set the value of the cookie.</div><div class="ttdef"><b>Definition</b> Cookie.h:138</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_aca3cee5a05ff2044e75f6d87b3a2cf43"><div class="ttname"><a href="classdrogon_1_1Cookie.html#aca3cee5a05ff2044e75f6d87b3a2cf43">drogon::Cookie::cookieString</a></div><div class="ttdeci">std::string cookieString() const</div><div class="ttdoc">Get the string value of the cookie</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_ad2d57c056e047790c2fa230e1f6d45f3"><div class="ttname"><a href="classdrogon_1_1Cookie.html#ad2d57c056e047790c2fa230e1f6d45f3">drogon::Cookie::Cookie</a></div><div class="ttdeci">Cookie(std::string key, std::string value)</div><div class="ttdoc">Constructor</div><div class="ttdef"><b>Definition</b> Cookie.h:39</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_ad44aa3e69c3904f3ce760d173affa72c"><div class="ttname"><a href="classdrogon_1_1Cookie.html#ad44aa3e69c3904f3ce760d173affa72c">drogon::Cookie::setValue</a></div><div class="ttdeci">void setValue(const std::string &amp;value)</div><div class="ttdoc">Set the value of the cookie.</div><div class="ttdef"><b>Definition</b> Cookie.h:130</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_ad4d7b38a06732fc404c3a23cf39e819c"><div class="ttname"><a href="classdrogon_1_1Cookie.html#ad4d7b38a06732fc404c3a23cf39e819c">drogon::Cookie::setMaxAge</a></div><div class="ttdeci">void setMaxAge(int value)</div><div class="ttdoc">Set the max-age of the cookie.</div><div class="ttdef"><b>Definition</b> Cookie.h:146</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_aed5163cd856d631e9cd955423e3cabc4"><div class="ttname"><a href="classdrogon_1_1Cookie.html#aed5163cd856d631e9cd955423e3cabc4">drogon::Cookie::getDomain</a></div><div class="ttdeci">const std::string &amp; getDomain() const</div><div class="ttdoc">Get the domain of the cookie</div><div class="ttdef"><b>Definition</b> Cookie.h:211</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_af0969c5652b7eeab6ccf22d319047e3c"><div class="ttname"><a href="classdrogon_1_1Cookie.html#af0969c5652b7eeab6ccf22d319047e3c">drogon::Cookie::SameSite</a></div><div class="ttdeci">SameSite</div><div class="ttdef"><b>Definition</b> Cookie.h:46</div></div>
<div class="ttc" id="aclassdrogon_1_1Cookie_html_af6fba12dad8155ac352552d7f50f4af2"><div class="ttname"><a href="classdrogon_1_1Cookie.html#af6fba12dad8155ac352552d7f50f4af2">drogon::Cookie::setDomain</a></div><div class="ttdeci">void setDomain(const std::string &amp;domain)</div><div class="ttdoc">Set the domain of the cookie.</div><div class="ttdef"><b>Definition</b> Cookie.h:82</div></div>
<div class="ttc" id="aexports_8h_html"><div class="ttname"><a href="exports_8h.html">exports.h</a></div></div>
<div class="ttc" id="aexports_8h_html_a00d0a001c2dd03906272e00b0598182e"><div class="ttname"><a href="exports_8h.html#a00d0a001c2dd03906272e00b0598182e">DROGON_EXPORT</a></div><div class="ttdeci">#define DROGON_EXPORT</div><div class="ttdef"><b>Definition</b> exports.h:15</div></div>
<div class="ttc" id="anamespacedrogon_html"><div class="ttname"><a href="namespacedrogon.html">drogon</a></div><div class="ttdoc">Drogon Test is a minimal effort test framework developed because the major C++ test frameworks doesn'...</div><div class="ttdef"><b>Definition</b> Attribute.h:23</div></div>
<div class="ttc" id="anamespacedrogon_html_aeb82de311298c06b27c32eecb1829bb4a35c3ace1970663a16e5c65baa5941b13"><div class="ttname"><a href="namespacedrogon.html#aeb82de311298c06b27c32eecb1829bb4a35c3ace1970663a16e5c65baa5941b13">drogon::StreamErrorCode::kNone</a></div><div class="ttdeci">@ kNone</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>
